<!--
 * @Author: your name
 * @Date: 2021-08-16 19:00:50
 * @LastEditTime: 2021-08-16 19:54:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day11\west\12-重写呼吸灯.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body div {
            box-sizing: border-box;
            position: relative;
        }
        /* 正方形大盒子room */
        
        body>div {
            width: 400px;
            height: 400px;
            background-color: black;
            padding: 30px;
            position: absolute;
            top: 100px;
            left: 600px;
            animation: change 2s infinite alternate;
        }
        
        @keyframes change {
            from {
                padding: 30px;
            }
            to {
                padding: 20px;
            }
        }
        /* 第一个大圈 */
        
        body>div>div {
            height: 100%;
            border: 5px solid #777;
            border-radius: 50%;
            padding: 20px;
        }
        /* 第二个圈 */
        
        body>div>div>div {
            height: 100%;
            border: 8px solid #fff;
            border-radius: 50%;
            animation: big 2s infinite alternate;
        }
        
        @keyframes big {
            from {
                padding: 0px;
            }
            to {
                padding: 10px;
            }
        }
    </style>
</head>

<body>
    <div>
        <div>
            <div></div>
        </div>
    </div>
</body>

</html>